var getWxml = (img1, img2) => {
  if(!img1 || !img2){
    console.error('参数为空')
    return
  }
  return `
  <view class="poster_a1_b1">
    <view class="poster_a1_b1_c1">
      <image class="poster_a1_b1_c1_d1" src="${img1}"></image>
    </view>
    <view class="poster_a1_b1_c4">
      <view class="poster_a1_b1_c4_d1">
        <text class="poster_a1_b1_c4_d1_e2">扫码查看直播预告</text>
        <text class="poster_a1_b1_c4_d1_e3">定制你的预购清单吧</text>
        <image class="poster_a1_b1_c4_d1_e4" src="https://community.afocus.net/cdn/uploadImage/yl/3m/lkjd23ouf.png"></image>
      </view>
      <image class="poster_a1_b1_c4_d2" src="${img2}"></image>
    </view>
  </view>
  `
}

var style = {
  poster_a1_b1: {
    width: 654,
    height: 818,
    backgroundColor: '#ffffff',
    borderRadius: 20,
  },
  poster_a1_b1_c1: {
    width: 654,
    height: 600,
    borderRadius: 20,
  },
  poster_a1_b1_c1_d1: {
    width: 654,
    height: 600,
  },
  poster_a1_b1_c3:{
    height:435,
  },
  poster_a1_b1_c3_d1:{
    width: 574,
    marginTop: 25,
    flexDirection: 'row',
    justifyContent: 'space-between',
    alignItems: 'center',
    position: 'relative',
    marginLeft: 40,
  },
  poster_a1_b1_c3_d1_e1:{
    width: 120,
    height: 120,
  },
  poster_a1_b1_c3_d1_e2:{
    fontSize: 28,
    width: 420,
    height: 28,
    lineHeight:28,
    color: '#333333'
  },
  poster_a1_b1_c4:{
    width: 574,
    marginTop: 30,
    flexDirection: 'row',
    justifyContent: 'space-between',
    marginLeft: 40,
    alignItems: 'center'
  },
  poster_a1_b1_c4_d1:{
    width: 360,
    height: 148,
    position: 'relative',
    backgroundColor: '#eb7b5b',
    borderRadius: 50,
    flexDirection: 'column',
    alignItems: 'center',
    justifyContent: 'center'
  },
  poster_a1_b1_c4_d1_e2:{
    fontSize: 28,
    lineHeight:28,
    height: 28,
    width: 224,
    color: '#ffffff',
  },
  poster_a1_b1_c4_d1_e3:{
    fontSize: 28,
    lineHeight:28,
    height: 28,
    width: 252,
    marginTop:11,
    color: '#ffffff',
  },
  poster_a1_b1_c4_d2:{
    width: 148,
    height: 148,
  },
  poster_a1_b1_c4_d1_e4:{
    position: 'absolute',
    width: 32,
    height: 35,
    right: -32,
    top:52
  }
}

module.exports = {
  getWxml,
  style
}